﻿/*------------------------------------------------
// File Description: CarryOverOrder DataBase Entity
// Author:			 Crane
// Create Time:		 2020-07-07 15:43:00
//------------------------------------------------*/

using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity;

namespace IOA.MES.DataAccess.Entity
{
	/// <summary>
	/// 结转单
	/// </summary>
	[Table(nameof(CarryOverOrder))]
	public class CarryOverOrder : BaseEntity
	{
		private string _orderNo = string.Empty;
		private string _carryoverno = string.Empty;
		private string _workshopCode = string.Empty;
		private string _workshopName = string.Empty;
		private string _warehouseCode = string.Empty;
		private string _warehouseName = string.Empty;
		private string _fromWorkOrderNo = string.Empty;
		private string _toWorkOrderNo = string.Empty;

		#region Public Property

		///<Summary>
		/// 订单号
		///</Summary>
		public string OrderNo
		{
			get { return string.IsNullOrWhiteSpace(_orderNo) ? string.Empty : _orderNo; }
			set { _orderNo = value; }
		}

		///<Summary>
		/// 订单号
		///</Summary>
		public string CarryOverNo
		{
			get { return string.IsNullOrWhiteSpace(_carryoverno) ? string.Empty : _carryoverno; }
			set { _carryoverno = value; }
		}

		///<Summary>
		/// 车间代码
		///</Summary>
		public string WorkshopCode
		{
			get { return string.IsNullOrWhiteSpace(_workshopCode) ? string.Empty : _workshopCode; }
			set { _workshopCode = value; }
		}

		///<Summary>
		/// 车间名称
		///</Summary>
		public string WorkshopName
		{
			get { return string.IsNullOrWhiteSpace(_workshopName) ? string.Empty : _workshopName; }
			set { _workshopName = value; }
		}

		///<Summary>
		/// 仓库代码
		///</Summary>
		public string WarehouseCode
		{
			get { return string.IsNullOrWhiteSpace(_warehouseCode) ? string.Empty : _warehouseCode; }
			set { _warehouseCode = value; }
		}

		///<Summary>
		/// 仓库名称
		///</Summary>
		public string WarehouseName
		{
			get { return string.IsNullOrWhiteSpace(_warehouseName) ? string.Empty : _warehouseName; }
			set { _warehouseName = value; }
		}

		///<Summary>
		/// 结转工单
		///</Summary>
		public string FromWorkOrderNo
		{
			get { return string.IsNullOrWhiteSpace(_fromWorkOrderNo) ? string.Empty : _fromWorkOrderNo; }
			set { _fromWorkOrderNo = value; }
		}

		///<Summary>
		/// 接收工单
		///</Summary>
		public string ToWorkOrderNo
		{
			get { return string.IsNullOrWhiteSpace(_toWorkOrderNo) ? string.Empty : _toWorkOrderNo; }
			set { _toWorkOrderNo = value; }
		}

		///<Summary>
		/// 结转单状态
		///</Summary>
		public Enum.CarryOverOrderStatus Status { get; set; }
		#endregion
	}

	public partial class MESContext
	{
		/// <summary>
		/// 结转单
		/// </summary>
		public virtual DbSet<CarryOverOrder> CarryOverOrders { get; set; }
	}
}